﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class kjxy : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    public string GetFourmId(string name)
    {
        TreasurerDataContext db = new TreasurerDataContext();
        string fourm_id = (from aF in db.Forums where aF.Name.Equals(name) select aF.ID).First();
        return fourm_id;
    }
    public string GetArticleId(string name)
    {
        TreasurerDataContext db = new TreasurerDataContext();
        string fourm_id = GetFourmId(name);
        string article_id = (from aA in db.Articles where aA.ForumID.Equals(fourm_id) select aA.ID).First();
        return article_id;
    }
}
